package com.dindang.maintenance.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.dindang.maintenance.mvp.contract.SendOrderContract;
import com.dindang.maintenance.mvp.model.SendOrderModel;


@Module
public class SendOrderModule {
    private SendOrderContract.View view;

    /**
     * 构建SendOrderModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public SendOrderModule(SendOrderContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    SendOrderContract.View provideSendOrderView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    SendOrderContract.Model provideSendOrderModel(SendOrderModel model) {
        return model;
    }
}